#include<stdio.h>

#define ONE 1   
#define TWO 1<<1
#define THREE 1<<2

void fun(int flags)
{
    if(ONE & flags) printf("flags have ONE! ");
    if(TWO & flags) printf("flags have TWO! ");
    if(THREE & flags) printf("flags have THREE! ");
    printf("\n");
}

int main()
{
    fun(ONE);
    fun(ONE | TWO);
    fun(ONE | TWO |THREE);
    return 0;
}
